{% extends 'base.html' %}
{% block content %}
    <div class="col-md-8">
        <form method="post">
            {% csrf_token %}
            {{ formset.management_form }}
            <span style="color: black;font-size: 24px;font-weight: bold" >学生考勤记录</span>
            <input type="submit"   style="margin-bottom: 5px"  value="保存" class="btn btn-success pull-right">
            <table class="table table-bordered">
                <thead>
                <tr>
                    <th>姓名</th>
                    <th>考勤</th>
                </tr>
                </thead>
                <tbody>
                {% for form in  formset %}
                    <tr>
                        {{ form.id }}
                            {#  生成文本，不用选择#}
                        <td>{{ form.instance.student }}</td>
                        <td>{{ form.record }} <span style="color: red">{{ form.errors.0 }}</span></td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        </form>
    </div>
{% endblock %}